<?php


namespace app\api\controller;


use app\BaseController;
use app\middleware\Auth;
use think\middleware\AllowCrossDomain;

class Menu extends BaseController
{
    protected $middleware = [AllowCrossDomain::class,Auth::class];
    public function index(){

    }
    public function left(){
        $menu=\Menu::all_alpha();
        foreach($menu as $k=>$v){
            foreach($v['power'] as $kk=>$vv){
                if(!$vv['is_menu']) unset($menu[$k]['power'][$kk]);
            }
        }
        return $this->msg(1,'','',$menu);
    }
}